﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XDAL
{
    public class tbUser : tbBase<tbUser>
    {
        private const string SQL_INSERT = "INSERT INTO tbuser(phonekey,adata) VALUES(@phonekey,now()) ";

        public bool Insert(string userphonekey)
        {
            if (string.IsNullOrEmpty(userphonekey))
            {
                return false;
            }
            MySql.Data.MySqlClient.MySqlParameter[] para = new MySql.Data.MySqlClient.MySqlParameter[]{
                new MySql.Data.MySqlClient.MySqlParameter("@phonekey",userphonekey)
            };
            return MySQL.MySqlHelper.ExecuteNonQuery(SQL_INSERT, para) > 0;
        }
    }
}
